-- GENERATED SPELL FOR [Mastok Wrilehiss] --


function spell0_12737(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12737', 627, 1)
end

function spell1_12737(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(8599,pUnit)
pUnit:RegisterEvent('Sorts_12737', 580, 1)
end

function spell2_12737(pUnit, Event) --@Piercing Howl,Self--
pUnit:FullCastSpellOnTarget(23600,pUnit)
pUnit:RegisterEvent('Sorts_12737', 6313, 1)
end

function spell3_12737(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12737', 665, 1)
end

function Sorts_12737(pUnit, Event)
local choix_sorts_12737 = math.random(0, 3)
if choix_sorts_12737 == 0 then
pUnit:RegisterEvent('spell0_12737', 1, 1)
end
if choix_sorts_12737 == 1 then
pUnit:RegisterEvent('spell1_12737', 1, 1)
end
if choix_sorts_12737 == 2 then
pUnit:RegisterEvent('spell2_12737', 1, 1)
end
if choix_sorts_12737 == 3 then
pUnit:RegisterEvent('spell3_12737', 1, 1)
end
end

function mob12737_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12737', math.random(1500, 3000), 1)
end

function mob12737_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12737_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12737_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12737, 1, 'mob12737_Action')
RegisterUnitEvent(12737, 2, 'mob12737_Leave')
RegisterUnitEvent(12737, 3, 'mob12737_Kill')
RegisterUnitEvent(12737, 4, 'mob12737_Die')
